<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    var  a=Math.random();
    console.log(a)
    console.log(parseInt(a))
    console.log("向上取最接近的整数"+""+Math.ceil(a))
    console.log("四舍五入"+""+Math.round(0.3))
</script>
</html>